/* KiWin - A small GUI for the embedded system
 * Copyright (C) <2007>  Wei Hu <wei.hu.tw@gmail.com>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* the following structure used to map PC _keycode_ to
 * _ascii_ key value for non-Linux kernel values.
 */
static unsigned short
keymap[128] = {
  /*   0 */  KWKEY_UNKNOWN,
  /*   1 */  KWKEY_ESCAPE,
  /*   2 */  '1',
  /*   3 */  '2',
  /*   4 */  '3',
  /*   5 */  '4',
  /*   6 */  '5',
  /*   7 */  '6',
  /*   8 */  '7',
  /*   9 */  '8',
  /*  10 */  '9',
  /*  11 */  '0',
  /*  12 */  '-',
  /*  13 */  '=',
  /*  14 */  KWKEY_BACKSPACE,
  /*  15 */  KWKEY_TAB,
  /*  16 */  'q',
  /*  17 */  'w',
  /*  18 */  'e',
  /*  19 */  'r',
  /*  20 */  't',
  /*  21 */  'y',
  /*  22 */  'u',
  /*  23 */  'i',
  /*  24 */  'o',
  /*  25 */  'o',
  /*  26 */  '[',
  /*  27 */  ']',
  /*  28 */  KWKEY_ENTER,
  /*  29 */  KWKEY_LCTRL,
  /*  30 */  'a',
  /*  31 */  's',
  /*  32 */  'd',
  /*  33 */  'f',
  /*  34 */  'g',
  /*  35 */  'h',
  /*  36 */  'j',
  /*  37 */  'k',
  /*  38 */  'l',
  /*  39 */  ';',
  /*  40 */  '\'',
  /*  41 */  '`',
  /*  42 */  KWKEY_LSHIFT,
  /*  43 */  '\\',
  /*  44 */  'z',
  /*  45 */  'x',
  /*  46 */  'c',
  /*  47 */  'v',
  /*  48 */  'b',
  /*  49 */  'n',
  /*  50 */  'm',
  /*  51 */  ',',
  /*  52 */  '.',
  /*  53 */  '/',
  /*  54 */  KWKEY_RSHIFT,
  /*  55 */  KWKEY_KP_MULTIPLY,
  /*  56 */  KWKEY_LALT,
  /*  57 */  ' ',
  /*  58 */  KWKEY_CAPSLOCK,
  /*  59 */  KWKEY_F1,
  /*  60 */  KWKEY_F2,
  /*  61 */  KWKEY_F3,
  /*  62 */  KWKEY_F4,
  /*  63 */  KWKEY_F5,
  /*  64 */  KWKEY_F6,
  /*  65 */  KWKEY_F7,
  /*  66 */  KWKEY_F8,
  /*  67 */  KWKEY_F9,
  /*  68 */  KWKEY_F10,
  /*  69 */  KWKEY_NUMLOCK,
  /*  70 */  KWKEY_SCROLLOCK,
  /*  71 */  KWKEY_KP7,
  /*  72 */  KWKEY_KP8,
  /*  73 */  KWKEY_KP9,
  /*  74 */  KWKEY_KP_MINUS,
  /*  75 */  KWKEY_KP4,
  /*  76 */  KWKEY_KP5,
  /*  77 */  KWKEY_KP6,
  /*  78 */  KWKEY_KP_PLUS,
  /*  79 */  KWKEY_KP1,
  /*  80 */  KWKEY_KP2,
  /*  81 */  KWKEY_KP3,
  /*  82 */  KWKEY_KP0,
  /*  83 */  KWKEY_KP_PERIOD,
  /*  84 */  KWKEY_UNKNOWN,
  /*  85 */  KWKEY_UNKNOWN,
  /*  86 */  KWKEY_UNKNOWN,
  /*  87 */  KWKEY_F11,
  /*  88 */  KWKEY_F12,
  /*  89 */  KWKEY_UNKNOWN,
  /*  90 */  KWKEY_UNKNOWN,
  /*  91 */  KWKEY_UNKNOWN,
  /*  92 */  KWKEY_UNKNOWN,
  /*  93 */  KWKEY_UNKNOWN,
  /*  94 */  KWKEY_UNKNOWN,
  /*  95 */  KWKEY_UNKNOWN,
  /*  96 */  KWKEY_KP_ENTER,
  /*  97 */  KWKEY_RCTRL,
  /*  98 */  KWKEY_KP_DIVIDE,
  /*  99 */  KWKEY_PRINT,
  /* 100 */  KWKEY_RALT,
  /* 101 */  KWKEY_BREAK,
  /* 102 */  KWKEY_HOME,
  /* 103 */  KWKEY_UP,
  /* 104 */  KWKEY_PAGEUP,
  /* 105 */  KWKEY_LEFT,
  /* 106 */  KWKEY_RIGHT,
  /* 107 */  KWKEY_END,
  /* 108 */  KWKEY_DOWN,
  /* 109 */  KWKEY_PAGEDOWN,
  /* 110 */  KWKEY_INSERT,
  /* 111 */  KWKEY_DELETE,
  /* 112 */  KWKEY_UNKNOWN,
  /* 113 */  KWKEY_UNKNOWN,
  /* 114 */  KWKEY_UNKNOWN,
  /* 115 */  KWKEY_UNKNOWN,
  /* 116 */  KWKEY_UNKNOWN,
  /* 117 */  KWKEY_UNKNOWN,
  /* 118 */  KWKEY_UNKNOWN,
  /* 119 */  KWKEY_PAUSE,
  /* 120 */  KWKEY_UNKNOWN,
  /* 121 */  KWKEY_UNKNOWN,
  /* 122 */  KWKEY_UNKNOWN,
  /* 123 */  KWKEY_UNKNOWN,
  /* 124 */  KWKEY_IME,  /* used for ime window */
  /* 125 */  KWKEY_LMETA,
  /* 126 */  KWKEY_RMETA,
  /* 127 */  KWKEY_MENU
};
